package clases;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityManager;
import javax.persistence.FetchType;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;


@Entity
@Table(name="COMPRAS")
public class Compra {

	
	private List <CompraItem> itemsCompra;
	private int idCompra;
	private int precioTotal;
	private int fechaCompra;
	
	
	
	// @Id(generate=GenerationType.AUTO) 
	@Column(name="ID")
	public int getIdCompra() {return idCompra;}
	
	@Column(name="PRECIO")
	public int getPrecioTotal() {return precioTotal;}
	public void setPrecioTotal(int precioTotal) {this.precioTotal = precioTotal;}
	
	
	
	public void setItemsCompra(List<CompraItem> itemsCompra) {this.itemsCompra = itemsCompra;}
	public void setIdCompra(int idCompra) {this.idCompra = idCompra;}
	
}

